public class p extends JFrame {
    public void test() {
}
    public void testTimer() {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            public void run() {
                test();
            }
        }, 0, 3000
    }
}
